<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/commons/inc.jsp" %>

<h3 id="navTitleId">检验随访</h3>

<body id="body">

<%@include file="/commons/showmessage.jsp" %>

<form name="jianyanform" id="jianyanform" method="post" action="${contextPath}/jianyan/jianyan.action?method=saveEditJianyan">
	<s:hidden name="laburine.urineid" id="laburine.urineid"></s:hidden>
	<s:hidden name="laburine.patientid" id="laburine.patientid"></s:hidden>
	<s:hidden name="lablipids.lipidsid" id="lablipidsn.lipidsid"></s:hidden>
	<s:hidden name="lablipids.patientid" id="lablipids.patientid"></s:hidden>
	<s:hidden name="labphy.physicalid" id="labphy.physicalid"></s:hidden>
	<s:hidden name="labphy.patientid" id="labphy.patientid"></s:hidden>
	<s:hidden name="labsugar.sugarid" id="labsugar.sugarid"></s:hidden>
	<s:hidden name="labsugar.patientid" id="labsugar.patientid"></s:hidden>
	<s:hidden name="patientid" id="patientid"></s:hidden>
	
	<table border="0" cellspacing="1" cellpadding="0" class="formTable" width="100%" >
		<thead>
			<tr><td width="100%" align="left" class="form-th" colspan="8">检验随访</td></tr>
		</thead>
		
		<tbody>
		<tr>
			<td class="form-td" width="10%"><label class="label">身高:</label></td>
			<td class="form-td" width="10%"><input type="text" name="labphy.height" id="labphy.height" size="5" value="${labphy.height}" onChange="javascript:bmi();"/>cm</td>	
			<td class="form-td" width="10%"><label class="label">体重:</label></td>
			<td class="form-td" width="10%"><input type="text" name="labphy.weight" id="labphy.weight" size="5" value="${labphy.weight}" onChange="javascript:bmi();"/>kg</td>
			<td class="form-td" width="10%"><label class="label">体质指数(BMI):</label></td>
			<td class="form-td" width="10%"><input type="text" name="labphy.bmi" id="labphy.bmi" size="5" readonly="readonly" value="${labphy.bmi}"/></td>
			<td class="form-td" width="10%"><label class="label">体型:</label></td> 
			<td class="form-td" width="10%"><select name="labphy.style" id="labphy.style">
					<option value="0" <s:if test="labphy.style == 0">selected</s:if>>正常</option>
					<option value="1" <s:if test="labphy.style == 1">selected</s:if>>消瘦</option>
					<option value="2" <s:if test="labphy.style == 2">selected</s:if>>超重</option>
					<option value="3" <s:if test="labphy.style == 3">selected</s:if>>肥胖</option>
				</select></td>
		</tr>
		<tr>
			<td class="form-td"><label class="label">腰围:</label></td>
			<td class="form-td"><input type="text" name="labphy.waistline" id="labphy.waistline" size="5" value="${labphy.waistline}" onChange="javascript:whr();"/>cm</td>
			<td class="form-td"><label class="label">臀围:</label></td>
			<td class="form-td"><input type="text" name="labphy.hip" id="labphy.hip"  size="5" value="${labphy.hip}" onChange="javascript:whr();"/>cm</td>
			<td class="form-td"><label class="label">腰臀比(WHR):</label></td>
			<td class="form-td"><input type="text" name="labphy.whr" id="labphy.whr" size="5" value="${labphy.whr}"/></td>
			<td class="form-td"><label class="label">血压:</label></td>
			<td class="form-td"><input type="text" name="labphy.pressurea" id="labphy.pressurea" size="5" value="${labphy.pressurea}"/>
				/<input type="text" name="labphy.pressureb" id="labphy.pressureb" size="5" value="${labphy.pressureb}"/>mmHg</td>
		</tr>	
	
		<tr>
			<td class="form-td"><label class="label">葡萄糖:</label></td>
			<td class="form-td"><label class="label">检查方式:</label></td>
			<td class="form-td"><select name="labsugar.testmethod" id="labsugar.testmethod">
					<option value="0" <s:if test="labsugar.testmethod == 0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="labsugar.testmethod == 1">selected</s:if>>毛细血管血糖(CBG)</option>
					<option value="2" <s:if test="labsugar.testmethod == 2">selected</s:if>>静脉血清血糖(VSG)</option>
				</select></td>	
			<td class="form-td"><input type="text" name="labsugar.sugar" id="labsugar.sugar" size="5" value="${labsugar.sugar}"/>mmol/L</td>
			<td class="form-td"><label class="label">糖化血红蛋白:</label></td>
			<td class="form-td"><input type="text" name="labsugar.xuehong" id="labsugar.xuehong" size="5" value="${labsugar.xuehong}"/>%</td>
			<td class="form-td"></td><td class="form-td"></td>
		</tr>	
		<tr>
			<td class="form-td"></td>
			<td class="form-td"><label class="label">检查时间:</label></td>
			<td class="form-td"><select name="labsugar.testtime" id="labsugar.testtime">
					<option value="0" <s:if test="labsugar.testtime == 0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="labsugar.testtime == 1">selected</s:if>>早餐前（空腹）</option>
					<option value="2" <s:if test="labsugar.testtime == 2">selected</s:if>>午餐前</option>
					<option value="3" <s:if test="labsugar.testtime == 3">selected</s:if>>晚餐前</option>
					<option value="4" <s:if test="labsugar.testtime == 4">selected</s:if>>早餐后2h</option>
					<option value="5" <s:if test="labsugar.testtime == 5">selected</s:if>>午餐后2h</option>
					<option value="6" <s:if test="labsugar.testtime == 6">selected</s:if>>晚餐后2h</option>
					<option value="7" <s:if test="labsugar.testtime == 7">selected</s:if>>10pm</option>
					<option value="8" <s:if test="labsugar.testtime == 8">selected</s:if>>12pm</option>
					<option value="9" <s:if test="labsugar.testtime == 9">selected</s:if>>3am</option>
					<option value="10" <s:if test="labsugar.testtime == 10">selected</s:if>>随机</option>
				</select></td>
			<td class="form-td"></td>
			<td class="form-td"><label class="label">糖化血清蛋白:</label></td>
			<td class="form-td"><input type="text" name="labsugar.xueqing" id="labsugar.xueqing" size="5" value="${labsugar.xueqing}"/>mmol/L</td>
			<td class="form-td"></td><td class="form-td"></td>
		</tr>
		
		<tr>
			<td class="form-td"><label class="label">胆固醇(TC):</label></td>
			<td class="form-td"><input type="text" name="lablipids.tc" id="lablipids.tc" size="5" value="${lablipids.tc}"/>mmol/l</td>	
			<td class="form-td"><label class="label">甘油三酯(TG):</label></td>
			<td class="form-td"><input type="text" name="lablipids.tg" id="lablipids.tg" size="5" value="${lablipids.tg}"/>mmol/l</td>
			<td class="form-td"><label class="label">高密度脂蛋白胆固醇(HDL-C):</label></td>
			<td class="form-td"><input type="text" name="lablipids.hdl" id="lablipids.hdl" size="5" value="${lablipids.hdl}"/>mmol/l</td>
			<td class="form-td"><label class="label">低密度脂蛋白胆固醇(LDL-C):</label></td>
			<td class="form-td"><input type="text" name="lablipids.ldl" id="lablipids.ldl" size="5" value="${lablipids.ldl}"/>mmol/l</td>
		</tr>
		
		<tr><td class="form-td" colspan="8"><b>尿常规</b></td></tr>
		<tr>
			<td class="form-td"><label class="label">尿比重(SG):</label></td>
			<td class="form-td"><input type="text" name="laburine.sg" id="laburine.sg" size="5" value="${laburine.sg}"/></td>	
			<td class="form-td"><label class="label">pH:</label></td>
			<td class="form-td"><input type="text" name="laburine.ph" id="laburine.ph" size="5" value="${laburine.ph}"/></td>
			<td class="form-td"><label class="label">亚硝酸盐(NIT):</label></td>
			<td class="form-td"><select name="laburine.nit" id="laburine.nit">
					<option value="0" <s:if test="laburine.nit==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.nit==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.nit==2">selected</s:if>>阳性</option>
				</select></td>
			<td class="form-td"><label class="label">尿蛋白(PRO):</label></td>
			<td class="form-td"><select name="laburine.pro" id="laburine.pro">
					<option value="0" <s:if test="laburine.pro==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.pro==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.pro==2">selected</s:if>>阳性</option>
				</select></td>
		</tr>
		<tr>	
			<td class="form-td"><label class="label">尿葡萄糖(GLU):</label></td>
			<td class="form-td"><select name="laburine.glu" id="laburine.glu">
					<option value="0" <s:if test="laburine.glu==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.glu==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.glu==2">selected</s:if>>阳性</option>
				</select></td>
			<td class="form-td"><label class="label">尿酮体(KET):</label></td>
			<td class="form-td"><select name="laburine.ket" id="laburine.ket">
					<option value="0" <s:if test="laburine.ket==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.ket==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.ket==2">selected</s:if>>阳性</option>
				</select></td>
			<td class="form-td"><label class="label">尿胆红素(BIL):</label></td>
			<td class="form-td"><select name="laburine.bil" id="laburine.bil">
					<option value="0" <s:if test="laburine.bil==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.bil==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.bil==2">selected</s:if>>阳性</option>
				</select></td>
			<td class="form-td"><label class="label">尿胆原(UBG):</label></td>
			<td class="form-td"><select name="laburine.ubg" id="laburine.ubg">
					<option value="0" <s:if test="laburine.ubg==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.ubg==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.ubg==2">selected</s:if>>阳性</option>
				</select></td>
		</tr>
		<tr>	
			<td class="form-td"><label class="label">尿隐血:</label></td>
			<td class="form-td"><select name="laburine.yinxue" id="laburine.yinxue">
					<option value="0" <s:if test="laburine.yinxue==0">selected</s:if>>请选择</option>
					<option value="1" <s:if test="laburine.yinxue==1">selected</s:if>>阴性</option>
					<option value="2" <s:if test="laburine.yinxue==2">selected</s:if>>阳性</option>
				</select></td>
			<td class="form-td"><label class="label">病理管型:</label></td>
			<td class="form-td"><input type="text" name="laburine.binliguan" id="laburine.binliguan" size="5" value="${laburine.binliguan}"/></td>
			<td class="form-td"><label class="label">小圆细胞:</label></td>
			<td class="form-td"><input type="text" name="laburine.xiaoyuan" id="laburine.xiaoyuan" size="5" value="${laburine.xiaoyuan}"/></td>
			<td class="form-td"><label class="label">结晶:</label></td>
			<td class="form-td"><input type="text" name="laburine.jiejin" id="laburine.jiejin" size="5" value="${laburine.jiejin}"/></td>
		</tr>
		
		<tr>		
			<td class="form-td"><label class="label">红细胞计数:</label></td>
			<td class="form-td"><input type="text" name="laburine.hongxb" id="laburine.hongxb" size="5" value="${laburine.hongxb}"/>/HP</td>
			<td class="form-td"><label class="label">白细胞计数:</label></td>
			<td class="form-td"><input type="text" name="laburine.baixb" id="laburine.baixb" size="5" value="${laburine.baixb}"/>/HP</td>
			<td class="form-td"><label class="label">上皮细胞数:</label></td>
			<td class="form-td"><input type="text" name="laburine.shangpi" id="laburine.shangpi" size="5" value="${laburine.shangpi}"/>/HP</td>
			<td class="form-td"><label class="label">管型计数:</label></td>
			<td class="form-td"><input type="text" name="laburine.guanxin" id="laburine.guanxin" size="5" value="${laburine.guanxin}"/>/LP</td>
		</tr>
		<tr>		
			<td class="form-td"><label class="label">红细胞计数:</label></td>
			<td class="form-td"><input type="text" name="laburine.hongxbb" id="laburine.hongxbb" size="5" value="${laburine.hongxbb}"/>/ul</td>
			<td class="form-td"><label class="label">白细胞计数:</label></td>
			<td class="form-td"><input type="text" name="laburine.baixbb" id="laburine.baixbb" size="5" value="${laburine.baixbb}"/>/ul</td>
			<td class="form-td"><label class="label">上皮细胞数:</label></td>
			<td class="form-td"><input type="text" name="laburine.shangpib" id="laburine.shangpib" size="5" value="${laburine.shangpib}"/>/ul</td>
			<td class="form-td"><label class="label">管型计数:</label></td>
			<td class="form-td"><input type="text" name="laburine.guanxinb" id="laburine.guanxinb" size="5" value="${laburine.guanxinb}"/>/ul</td>
		</tr>
	</tbody>
	</table>
	<table>
		<tr>
			<td align="center" colspan="5"> 
			<input type="reset" value="重置"> 
		    <input type="button" onclick="saveEdit('save');" value="保存"></td>
		</tr>
	</table>
</form>

<%@include file="/commons/tableSel.jsp" %>

</body>

<style type="text/css">
body {
	height: 100%;
	width: 100%;
}
</style>

<script>
function saveEdit(type){
	if(type=='refresh'){
		location.reload();
	}else if(type=='save'){
		if(!Validator.Validate($('jianyanform'),3)){
			return;
		}	
		$('jianyanform').submit();
	}
}
function bmi(){
	var a = $('labphy.height').value;
	var b = $('labphy.weight').value;
	if(a!=null && b!=null){
		if(a > 0 && b > 0){
			var r = 100*100*(b/a)/a;
			r = r.toFixed(2);	
			$('labphy.bmi').value = r;
			r = parseFloat(r);
			if(r < 18.5){
				$('labphy.style').value = 1;
				$('labphy.style').options[1].selected=true;//消瘦
			}else if(r <= 23.9){
				$('labphy.style').value = 0;
				$('labphy.style').options[0].selected=true;   //正常
			}else if(r <= 27.9){
				$('labphy.style').value = 2;
				$('labphy.style').options[2].selected=true;   //超重
			}else{
				$('labphy.style').value = 3;
				$('labphy.style').options[3].selected=true;   //肥胖
			}
		}
	}
}
function whr(){
	var a = $('labphy.waistline').value;
	var b = $('labphy.hip').value;
	if(a!=null && b!=null){
		if(a > 0 && b > 0){	
			var q = a/b;
			q = q.toFixed(2);
			$('labphy.whr').value = q;		
		}
	}
}
</script>